package com.woniuxy03;

import java.util.Arrays;

/**
 * @author 作者
 * @create 2025-11-03 16:34
 */
public class Test01 {
    public static void main(String[] args) {
//        int[] a=new int[10];
//        for(int i : a){}
//        char[] chars=new char[5];
//        for( char c : chars){}
//        String[] strs=new String[3];
//        for(String str : strs){}
        //对象数组:学生数组，数组存储3个学生
        Student[] students=new Student[3];
        //NullPointerException
//        System.out.println(students[0].getAge());
        //学生数组分配第一个元素
        students[0]=new Student(1,"zs",11);
        students[1]=new Student(2,"ls",15);
        students[2]=new Student(3,"ww",13);
        System.out.println(students[0].getAge());
    }
}
